package org.example;

/**
 * @author ZerlindaLi create at 2021/3/30 10:01
 * @version 1.0.0
 * @description IntegerDriver
 */
public class IntegerDriver {
    public static void main(String[] args) {
        Integer a = Integer.valueOf(100);
        Integer b = 100;
        System.out.println(a == b); // true

        Integer a1 = new Integer(100);
        Integer b1 = 100;
        System.out.println(a1 == b1); // true

        Integer c = Integer.valueOf(130);
        Integer d = 130;
        System.out.println(c == d); // false

        Integer e = Integer.valueOf(1);
        int f = 1;
        System.out.println(e == f); // true

        Integer g = Integer.valueOf(130);
        int h = 130;
        System.out.println(g == h); // true Integer会自动拆箱成int类型

    }
}
